import 'package:shared_preferences/shared_preferences.dart';

LocalStorage? shared;

class LocalStorage {
  late SharedPreferences prefs;
  LocalStorage({required this.prefs});
  static Future<LocalStorage> getShared() async {
    if (shared == null) {
      SharedPreferences preferences = await SharedPreferences.getInstance();
      shared = LocalStorage(prefs: preferences);
    }
    return shared!;
  }

  SharedPreferences getPrefs() {
    return prefs;
  }
}
